package team.se.tms.po;

import lombok.Data;
import team.se.tms.annotation.Regex;

import java.io.Serializable;
/**
 * LabelInfo实体类
 *
 * @author johnny
 * @date 2018/11/21
 */
@Data
public class LabelInfo implements Serializable{
    @Regex("^[A-Za-z0-9]{16}$")
    private String labelId;

    @Regex("^[\\u4e00-\\u9fa5]{1,8}$")
    private String labelName;

    @Override
    public String toString() {
        return "LabelInfo{" +
                "labelId='" + labelId + '\'' +
                ", labelName='" + labelName + '\'' +
                '}';
    }
    @Override
    public boolean equals(Object obj) {
        //&&this.getLabelName()==((LabelInfo)obj).getLabelName()
        if(this.getLabelId().equals(((LabelInfo)obj).getLabelId())){
            return true;
        }
        return false;
    }
}
